<template>
  <uploader :options="options" class="uploader-example">
    <uploader-unsupport></uploader-unsupport>
    <uploader-drop>
      <p>Drop files here to upload or</p>
      <uploader-btn>select files</uploader-btn>
      <uploader-btn :attrs="attrs">select images</uploader-btn>
      <uploader-btn :directory="true">select folder</uploader-btn>
    </uploader-drop>
    <uploader-list></uploader-list>
  </uploader>
</template>

<script>
  import Cookies from 'js-cookie';

  export default {
    data() {
      return {
        options: {
          // https://github.com/simple-uploader/Uploader/tree/develop/samples/Node.js
          //target: 'http://106.75.8.121:8080/ecgapi/library/localFile/fileUpload',
          target: 'http://localhost:1592/localFile/fileUpload',
          headers: {Authorization: "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtaGIiLCJ1c2VySWQiOiIyMCIsIm5hbWUiOiLmooXmtbfms6IiLCJtZWRJbnN0aXR1dGVJZCI6MSwiZGV2aWNlVHlwZSI6IlBDIiwiZXhwIjoxNTQ1MjIxMzY3fQ.yB7gXi2LGYyEQhx-jdIHbhkUAWOIjE6JPvvYh5MyoMyutppDA6PIYgyPzDVWHeYtvq6In7_S0j_p2rwegbvsP7cTjMXu1vywjlqLGOIA9bJm1zTtFlMwZaIZbnkKnHj4JDjahwk-J2GiA3wS99uePHcACqn9UXr-LNdfwwkyNJA"},
          testChunks: true,
          simultaneousUploads: 3,
         // testMethod: 'POST',
          prioritizeFirstAndLastChunk: true
        },
        attrs: {
          accept: 'image/*'
        }
      }
    }
  }
</script>

<style>
  .uploader-example {
    width: 880px;
    padding: 15px;
    margin: 40px auto 0;
    font-size: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
  }

  .uploader-example .uploader-btn {
    margin-right: 4px;
  }

  .uploader-example .uploader-list {
    max-height: 440px;
    overflow: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
</style>
